package struct
{
	public class Stack
	{
		private var _top:int = -1;
		private var _arr:Array = null;
		public function Stack()
		{
			_arr = new Array();
			_top = -1;
		}
		
		public function push(e:Object):void
		{
			_arr.push(e);
			_top++;
		}
		
		public function pop():Object
		{
			var ret:Object = null;
			if(_top >= 0){
				ret = _arr.pop();
				_top--;
			}
			return ret;
		}
	}
}